/**
 * 中医馆首页
 */
(function() {
	'use strict';
	require(['orange','c','bootstrap','jquery','jqueryUI'], function(orange,c,jquery,jqueryUI) {
		c.init();
		
		function fullscreen() {		//全屏
			var el = document.documentElement,
		        rfs = el.requestFullScreen || el.webkitRequestFullScreen || el.mozRequestFullScreen || el.msRequestFullScreen,
		        wscript;
		    if(typeof rfs != "undefined" && rfs) {
		        rfs.call(el);
		        return;
		    }
		    if(typeof window.ActiveXObject != "undefined") {
		        wscript = new ActiveXObject("WScript.Shell");
		        if(wscript) {
		            wscript.SendKeys("{F11}");
		        }
		    }
		}
		 
		orange.bindClick(document.getElementById("nav4_ul").querySelectorAll("li>a"), document.getElementById("nav4_masklayer"));
		
		//绑定全屏按钮
		$('#button_fullScreen').bind('click',function(){
			fullscreen();
		});
		//绑定刷新按钮
		$('#button_refresh').bind('click',function(){
			history.go(0);
		});
		//绑定后退按钮
		$('#button_back').bind('click',function(){
			orange.loadPage({url: 'system/system.service', target: 'index_center', selector: '#system_center_div', replace: true, success: function(response) {	//	渲染左部导航模块
				
			}});
		});
		
		//右边导航的加载ylm
		orange.loadPage({
			url: 'system/getPage.service?path=tcm/rightNav', 
			target: 'tcm_nav_right', 
			selector: '#inner_right_nav', 
			replace: true, 
			success: function(response) {	//	渲染左部导航模块
			}
		});
		fullscreen();
	});
	
})();
 
